﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LeanAndon.Services.Test
{
    using Library.Repository;
    using Library.Repository.Spec;

    using NUnit.Framework;

    [TestFixture]
    public class ProjectServiceShould
    {
        private IProjectRepository projectRepository = new FakeProjectRepository();

        private IProjectService projectService;

        [TestFixtureSetUp]
        public void TestInitialize()
        {
            this.projectService = new ProjectService(projectRepository);
        }

        [Test]
        public void ReturnListOfAvailableProject()
        {
            ProjectResponse results = this.projectService.GetActiveProjects();
            Assert.AreEqual(3,results.Projects.Count);
            Assert.AreEqual(1,results.Projects[0].Id);
            Assert.AreEqual("Project 1",results.Projects[0].Name);
        }
    }
}
